package com.ctp.ui.main;

import javax.swing.JDesktopPane;

import com.ctp.display.manager.AccountManager;
import com.ctp.display.manager.MarketManager;
import com.ctp.ui.table.AccountTable;
import com.ctp.ui.table.MarketTable;

public class MainDesktop extends JDesktopPane {

	private static final long serialVersionUID = 1L;

	private MarketTable marketTable = new MarketTable();
	
	private AccountTable accountTable = new AccountTable();

	public MainDesktop() {
		initMarketTable();
		initAccountTable();
	}

	private void initMarketTable() {
		MarketManager.instance().addObserver(marketTable);
		marketTable.setLocation(20, 20);

		add(marketTable);
	}
	
	private void initAccountTable() {
		AccountManager.instance().addObserver(accountTable);
		accountTable.setLocation(20, 92);

		add(accountTable);
	}

}
